<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>手机端首页</title>
    <link rel="stylesheet" href="lib/mui/css/mui.min.css">
    <link rel="stylesheet" href="lib/fa/css/font-awesome.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/search.css">
    <link rel="icon" href="favicon.ico">
</head>
<body>
    <div class="lt-container">
        <div class="lt-header">
            <a href="javascript:history.go(-1);" class="home mui-icon mui-icon-back"></a>
            <h3>搜索中心</h3>
            <!-- <a href="search.html" class="search fa fa-search"></a> -->
        </div>
        <div class="lt-main">
            <!-- 搜索框 -->
            <div class="lt-search">
                <input type="text" placeholder="请输入搜索关键字" value="" class='search-text'>
                <button class="mui-btn mui-btn-primary search_btn">搜索</button>
            </div>

            <!-- 历史记录 -->
            <div class="lt-history">
            </div>
        </div>
        <div class="lt-footer">
            <ul>
                <li class="current">
                    <a href="index.html">
                        <i class="fa fa-home"></i>
                        <p>首页</p>
                    </a>
                </li>
                <li>
                    <a href="category.html">
                        <i class="fa fa-bars"></i>
                        <p>分类页</p>
                    </a>
                </li>
                <li>
                    <a href="cart.html">
                        <i class="fa fa-shopping-cart"></i>
                        <p>购物车</p>
                    </a>
                </li>
                <li>
                    <a href="user.html">
                        <i class="fa fa-user"></i>
                        <p>用户中心</p>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <script src="lib/zepto/zepto.min.js"></script>
    <script src="lib/artTemplate/template-web.js"></script>
    <script src="lib/mui/js/mui.js"></script>
    <script src="js/common.js"></script>
    <script src="js/search.js"></script>
    <script type="text/html" id="list-temp">
        {{if list.length==0}}
            <p>没有历史数据!</p>
        {{else}}
            <div class="titile mui-clearfix">
                    <span class="mui-pull-left">搜索历史</span>
                    <span class="mui-pull-right btn-empty">
                        <i class="fa fa-trash"></i>
                        清空记录
                    </span>
            </div>
            <div class="content">
                <ul class="history-list">
                    {{each list v i}}
                        <li>
                            <!-- 点击历史记录跳转到搜索列表页 -->
                            <a href="searchList.html?key={{ v }}" class="mui-pull-left">{{v}}</a>
                            <i class="btn-delete mui-pull-right mui-icon mui-icon-closeempty" data-index="{{i}}"></i>
                        </li>
                    {{/each}}
                </ul>
            </div>
        {{/if}}
    </script>
</body>
</html>